# coding: utf-8
from . import db, BaseModel



class Article(db.Model):
    __tablename__ = 'article'

    auto_id = db.Column(db.Integer, primary_key=True)
    article_id = db.Column(db.Integer, info='文章id')
    article_title = db.Column(db.String(255, 'utf8mb4_general_ci'), info='文章标题')
    article_content = db.Column(db.String(5000, 'utf8mb4_general_ci'), info='文章内容')
    user_id = db.Column(db.Integer, info='用户id做为外键')
    status = db.Column(db.Integer, server_default=db.FetchedValue(), info='文章状态')
    administrator_id = db.Column(db.Integer, info='管理员的id')
    is_delete = db.Column(db.Integer, server_default=db.FetchedValue(), info='是否删除')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建记录时间')
    update_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='更新记录时间')
